﻿using System.Collections.Generic;
using System.Runtime.Serialization;

namespace IMDBApi.Contracts.Entities.Features
{
    [DataContract]
    public class TopMovies
    {
        [DataMember(Name = "exp")]
        public int Exp { get; set; }

        [DataMember(Name = "@meta")]
        public Meta Meta { get; set; }

        [DataMember(Name = "data")]
        public Data Data { get; set; }

        [DataMember(Name = "copyright")]
        public string Copyright { get; set; }
    }

    [DataContract]
    public class Meta
    {
        [DataMember(Name = "serverTimeMs")]
        public int ServerTime { get; set; }

        [DataMember(Name = "requestId")]
        public string RequestId { get; set; }
    }

    [DataContract]
    public class Data
    {
        [DataMember(Name = "list")]
        public List List { get; set; }
    }

    [DataContract]
    public class List
    {
        [DataMember(Name = "label")]
        public string Label { get; set; }

        [DataMember(Name = "list")]
        public List<List2> Lists { get; set; }
    }

    [DataContract]
    public class List2
    {
        [DataMember(Name = "num_votes")]
        public int NumVotes { get; set; }

        [DataMember(Name = "tconst")]
        public string Tconst { get; set; }

        [DataMember(Name = "type")]
        public string Type { get; set; }

        [DataMember(Name = "title")]
        public string Title { get; set; }

        [DataMember(Name = "can_rate")]
        public bool CanRate { get; set; }

        [DataMember(Name = "rating")]
        public double Rating { get; set; }

        [DataMember(Name = "image")]
        public Image Image { get; set; }

        [DataMember(Name = "year")]
        public string Year { get; set; }
    }

    [DataContract]
    public class Image
    {
        [DataMember(Name = "width")]
        public int Width { get; set; }

        [DataMember(Name = "url")]
        public string Url { get; set; }

        [DataMember(Name = "height")]
        public int Height { get; set; }
    }
}
